package com.example.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


//将mybatis接口作为bean加载进ioc容器中      在需要接口实例时，mybatis会为接口生成实现子类   123
@Repository
public interface loginMapper {
    String isLogin(@Param("username") String username ,@Param("password") String password);

    @Select("SELECT username from logins where username = #{username} and password = #{password}")
    String isLogin2(@Param("username") String username ,@Param("password") String password);
}